﻿<%@ Page Title="Machine Details" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="TrendReport.aspx.cs" Inherits="admin_TrendReport" %>

<asp:Content ID="Head" ContentPlaceHolderID="head" runat="Server">
    <link href="../styles/admin.css" rel="stylesheet" type="text/css" />
     <script src="../javascripts/jquery-1.4.3.min.js" type="text/javascript"></script>

    <script src="../javascripts/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {
            $(".datepicker").datepicker({ dateFormat: 'dd/mm/y' });
        });  
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
       <div id="top_menu">
        <div id="help_button">
            help
        </div>
                                <div id="logout">
            <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="../Default.aspx"
                OnLoggingOut="LoginStatus1_LoggingOut" />
        </div>
    </div>

    <div id="page_title">
        ADMINISTRATION
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="left_content">
        <div class="menu">
            <ul>
                <li><a href="Home.aspx">Home</a></li>
                <li><a href="Mng_Client.aspx">Manage Clients</a></li>
                <li><a href="Mng_Site.aspx">Manage Sites</a></li>
                <li><a href="#" class="current">View Machine Details</a></li>
                <li><a href="Mng_Comp.aspx">Manage Components</a></li>
                <li><a href="Mng_Report.aspx">Manage Reports</a></li>
                <li><a href="Mng_WO.aspx">Manage Work Order</a></li>
                <li><a href="Mng_FaultsRecom.aspx">Manage Faults Recommendation</a></li>
            </ul>
        </div>
    </div>
    <!-- end of left content -->
    <div id="right_content">
        <div class="content_area">
            <h2>
                <asp:Label ID="MachineNameLabel" runat="server">
                </asp:Label>
            </h2>
            <div class="form_box1">
                <%--<asp:ScriptManager EnablePartialRendering="true" ID="ScriptManager2" runat="server"></asp:ScriptManager>--%>
                <table id="selectedtable" runat="server">
                    <tr>
                        <td class="label">
                            From the date:
                        </td>
                        <td>
                            <asp:DropDownList ID="fromDate_DropDownList" AutoPostBack="true" runat="server" OnSelectedIndexChanged="fromDate_changed"
                                CssClass="dropDownList">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">
                            To the date:
                        </td>
                        <td>
                            <asp:UpdatePanel ID="upnl0" runat="server">
                                <ContentTemplate>
                                    <asp:DropDownList ID="toDate_DropBoxList" runat="server" AutoPostBack="true" CssClass="dropDownList">
                                    </asp:DropDownList>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="fromDate_DropDownList" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="Get_Button0" runat="server" Text="Get matrix" OnClick="GetReport"
                                CssClass="buttons" />
                        </td>
                    </tr>
                </table>
                <div class="form_box1">
                    <asp:GridView ID="TaskGridView" runat="server" AutoGenerateColumns="False" 
                        AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" BackColor="White" 
                        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        OnRowCancelingEdit="TaskGridView_RowCancelingEdit" 
                        OnRowDataBound="TaskGridView_RowDataBound" 
                        OnRowDeleting="TaskGridView_RowDeleting" OnRowEditing="TaskGridView_RowEditing" 
                        OnRowUpdating="TaskGridView_RowUpdating">
                        <RowStyle BackColor="White" ForeColor="#003399" />
                        <Columns>
                            <asp:TemplateField HeaderText="Dates" SortExpression="Dates">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" BorderStyle="None">
                                            </asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Values" SortExpression="Values">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox2"  runat="server" BorderStyle="None"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                        <HeaderStyle BackColor="#003399" CssClass="header" Font-Bold="True" 
                            ForeColor="#CCCCFF" />
                    </asp:GridView>
                   
                </div>
                <div class="form_box1">
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text="Date" CssClass="label"></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text="Value:" CssClass="label"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:TextBox ID="txtAttribute" runat="server" class="datepicker"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtValue" runat="server" CssClass="fields"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="Get_Button" runat="server" Text="Add Attribute" OnClick="AddAttribute"
                                    CssClass="buttons" />
                            </td>
                            <td>
                                <asp:Button ID="save" runat="server" Text="Submit Edit"  CssClass="buttons" 
                                    onclick="save_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                 <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Button1" runat="server" Text="Get graph report" 
                        onclick="Button1_Click1" />
                <div class="img_machine">
                    <asp:ImageMap ID="ImageMap2" OnClick="GetValue" runat="server">
                    </asp:ImageMap><br />
                    <asp:HyperLink ID="photoHyperLink" rel="lytebox" runat="server" rev="width: 750px; height: 650px; scrolling: no;"
                        Style="text-align: center">&nbsp;&nbsp;&nbsp;&nbsp;</asp:HyperLink>
                </div>
            </div>
        </div>
        <asp:LinkButton ID="BackButton" runat="server" CssClass="backbtn" PostBackUrl="Mng_Machine.aspx">Back</asp:LinkButton>
        <!-- end of right content -->
    </div>
</asp:Content>
